import Vue from 'vue'
import Router from 'vue-router'
import Express from '@/components/pages/client/Express'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: () => import(/* webpackChunkName: "Login" */ '../components/pages/index/index.vue'),
      meta: {
        title: '在线下单'
      } 
    },
    {
      path: '/detail',
      name: 'Detail',
      component: () => import(/* webpackChunkName: "Login" */ '../components/pages/index/detail.vue'),
      meta: {
        title: '详情'
      } 
    },
    {
      path: '/express',
      name: 'Express',
      component: Express,
      meta: {
        title: '在线下单',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      } 
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import(/* webpackChunkName: "Login" */ '../components/pages/Login.vue'),
      meta: {
        title: '登录',
      }  
    },
    {
      path: '/register',
      name: 'Register',
      component: () => import(/* webpackChunkName: "Register" */ '../components/pages/Register.vue'),
      meta: {
        title: '注册',
      }
    },
    {
      path: '/expressInquiry',
      name: 'ExpressInquiry',
      component: () => import(/* webpackChunkName: "ExpressInquiry" */ '../components/pages/client/ExpressInquiry'),
      meta: {
        title: '快递查询',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/personalCenter',
      name: 'PersonalCenter',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/client/PersonalCenter'),
      meta: {
        title: '个人中心',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/courier',
      name: 'Courier',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/courier/Courier'),
      meta: {
        title: '快递员',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/courierPersonalCenter',
      name: 'CourierPersonalCenter',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/courier/CourierPersonalCenter'),
      meta: {
        title: '个人中心',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/dot',
      name: 'Dot',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/dot/Dot'),
      meta: {
        title: '网点',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/dotInfo',
      name: 'DotInfo',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/dot/DotInfo'),
      meta: {
        title: '网点资料',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/transferStation',
      name: 'TransferStation',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/transferStation/TransferStation'),
      meta: {
        title: '中转站',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    },
    {
      path: '/transferStationInfo',
      name: 'TransferStationInfo',
      component: () => import(/* webpackChunkName: "PersonalCenter" */ '../components/pages/transferStation/TransferStationInfo'),
      meta: {
        title: '中转站资料',
        type: 'login'  // 是否需要判断是否登录,这里是需要判断
      }
    }
  ]
})
